package com.example.demo.api.controller;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class LoginForm {
    @NotBlank(message = "code不能为空")
    private String code;

    @NotBlank(message = "nickname不能为空")
    private String nickname;

    @NotBlank(message = "sex不能为空")
    @Pattern(regexp = "^男$|^女$",message = "sex内容非法")
    private String sex;

    @NotBlank(message = "tel不能为空")
    @Pattern(regexp = "^1\\d{10}$",message = "tel内容非法")
    private String tel;

}
